//
//  HCComposeMenuButton.swift
//  Hweibome
//
//  Created by apple on 15/12/14.
//  Copyright © 2015年 hechuan. All rights reserved.
//

import UIKit

class HCComposeMenuButton: UIButton {

    override var  highlighted: Bool {
        set {

}
        get{
    return false
}
    }
    
    override init(frame:CGRect)
    {
        super.init(frame: frame)
        
        titleLabel?.textAlignment = .Center
        titleLabel?.font = UIFont.systemFontOfSize(14)
        setTitleColor(UIColor.darkGrayColor(), forState: UIControlState.Normal)
        imageView?.contentMode = .Center
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        //imageView move
        imageView?.y = 0
        imageView?.width = width
        imageView?.height = width
        
        titleLabel?.x = 0
        titleLabel?.y = width
        titleLabel?.width = width
        titleLabel?.height = height - width
    }

    
}
